<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script>
			/**
			 * 其他类型装boolean
			 * 1.number
			 * 	0，NaN为false，其他都为true
			 * 2.string
			 * 	""为false 其他为true
			 * 3.null && nudefined
			 * 	全部为false
			 * 4.对象
			 * 	全为true
			 */
			var num1 = 123;
			var num2 = 0;
			var num3 = NaN;
			document.write(!num1 + "<br>");
			document.write(!!num1 + "<br>");
			document.write("<br>");

			document.write(!num2 + "<br>");
			document.write(!!num2 + "<br>");
			document.write("<br>");
			document.write(!num3 + "<br>");
			document.write(!!num3 + "<br>");

			document.write("<br>");

			var str = "";
			var str2 = "123";
			document.write(!str + "<br>");
			document.write(!!str + "<br>");

			document.write("<br>");

			document.write(!str2 + "<br>");
			document.write(!!str2 + "<br>");

			document.write("<br>");

			var obj = null;
			var obj2;

			document.write(!obj + "<br>");
			document.write(!!obj + "<br>");
			document.write("<br>");

			document.write(!obj2 + "<br>");
			document.write(!!obj2 + "<br>");

			document.write("<br>");

			var date = new Date();
			document.write((!date) + "<br>")
			document.write((!!date) + "<br>")

			document.write("<br>");
		</script>
	</body>
</html>
